import axios from "axios";

export const getOneSay = () => {
    return axios({
        method: 'get',
        url: 'https://international.v1.hitokoto.cn/'
    })
}

export const getDay = () => {
    var now = new Date();
    var month = now.getMonth() + 1;//得到月份
    var date = now.getDate();//得到日期
    var time;
    if(now.getHours() >= 0 && now.getHours() < 12){
        time = "上午"
    } else if ( now.getHours() >= 12 && now.getHours() < 18){
        time = "下午"
    }else{
        time = "晚上"
    }
    return '今天是' + month + '月' + date + '日' + '，' + '周'+'日一二三四五六'.charAt(new Date().getDay()) + "的" + time;
}

export const getNextHoliday = () => {
    return axios({
        method: 'get',
        url: `momoyu/calendar/nextFourHoliday`
    })
}